package com.insigma.yanwenlong.bookkeeping.service;

import java.sql.SQLException;
import java.util.List;

import com.insigma.yanwenlong.bookkeeping.dao.CategoryDao;
import com.insigma.yanwenlong.bookkeeping.dao.CategoryDaoImpl;
import com.insigma.yanwenlong.bookkeeping.pojo.Category;
import com.insigma.yanwenlong.bookkeeping.pojo.vo.CategoryVo;

public class CategoryServiceImpl implements CategoryService{
	private CategoryDao categoryDao = new CategoryDaoImpl();
	@Override
	public List<Category> findCategories() throws SQLException {
		return categoryDao.findCategories();
	}
	@Override
	public Category findDirectionIdById(int id) throws SQLException {
		return categoryDao.findDirectionIdById(id);
	}
	@Override
	public List<CategoryVo> findCategoryVos() throws SQLException {
		return categoryDao.findCategoryVos();
	}
	@Override
	public int addCategory(Category category) throws SQLException {
		return categoryDao.addCategory(category);
	}

}
